package com.shensi.api.admin.client.station;

import com.shensi.api.admin.client.fallback.monitor.SysLogininforClientFallBack;
import com.shensi.api.admin.domian.station.dto.QueryNoInsensTransDTO;
import com.shensi.api.admin.domian.station.dto.QueryNoInsensTransSumDTO;
import com.shensi.api.admin.domian.station.dto.SysCashReceiptsDto;
import com.shensi.api.admin.domian.station.vo.MerAccGetServiceFeeDTO;
import com.shensi.api.admin.domian.station.vo.NoInsensAccInfoVO;
import com.shensi.api.admin.domian.station.vo.QueryNoInsensTransSumVO;
import com.shensi.common.core.constant.CloudConstant;
import com.shensi.common.core.domain.AjaxResult;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;


/**
 * @author mao
 */
@FeignClient(
        value = CloudConstant.ADMIN_SERVER,
        fallbackFactory = SysLogininforClientFallBack.class)
@Component
public interface CashReceiptsClient {

    /**
     * 现金分页查询
     *
     * @return 查询结果
     */
    @GetMapping("/cashReceipts/queryByPage")
    public AjaxResult queryByPage(@RequestParam("id") Long id,
                                  @RequestParam("startingTime") String startingTime,
                                  @RequestParam("endTimeint") String endTimeint,
                                  @RequestParam("page") int page,
                                  @RequestParam("pageSize") int pageSize,
                                  @RequestParam("phoneNumber") String phoneNumber,
                                  @RequestParam("stationId") Long stationId,
                                  @RequestParam("enterpriseId") Long enterpriseId);


    /**
     * 查询提现列表
     */
    @GetMapping("/cashReceipts/queryNoInsensTrans")
    public Map<String, Object> queryNoInsensTrans(QueryNoInsensTransDTO queryNoInsensTransDTO);

    /**
     * 查询提现汇总
     */
    @GetMapping("/cashReceipts/queryNoInsensTransSum")
    public QueryNoInsensTransSumVO queryNoInsensTransSum(QueryNoInsensTransSumDTO queryNoInsensTransSumDTO);

    /**
     *
     * 账户信息
     */
    @GetMapping("/cashReceipts/listStationMerAccInfo")
    public List<NoInsensAccInfoVO> listStationMerAccInfo();

    /**
     *
     * 取服务费
     */
    @PostMapping("/cashReceipts/getServiceFee")
    public AjaxResult getServiceFee(MerAccGetServiceFeeDTO merAccGetServiceFeeDTO);

    /**
     *
     * 查询商户账户余额
     */
    @PostMapping("/cashReceipts/queryBalance")
    public Map<String, Object> queryBalance(MerAccGetServiceFeeDTO merAccGetServiceFeeDTO);

    /**
     *
     * 查询商户账户余额
     */
    @PostMapping("/cashReceipts/cash")
    public Map<String, Object> cash(MerAccGetServiceFeeDTO merAccGetServiceFeeDTO);



    /**
     * 新增数据
     *
     * @param cashReceipts 实体
     * @return 新增结果
     */
    @PostMapping("/cashReceipts/add")
    public AjaxResult add(@RequestBody SysCashReceiptsDto cashReceipts);

    /**
     * 编辑数据
     *
     * @param cashReceipts 实体
     * @return 编辑结果
     */
    @PutMapping("/cashReceipts/edit")
    public AjaxResult edit(@RequestBody SysCashReceiptsDto cashReceipts);
    /**
     * 删除数据
     *
     * @param id 主键
     * @return 删除是否成功
     */
    @DeleteMapping("/cashReceipts/deleteById")
    public AjaxResult deleteById(@RequestBody List<Long> id);

}
